package Test10_11;

import java.util.Scanner;

public class Test02 {
    public static void main(String[] args) {
        //将一个正整数分解质因数。例如：输入90,打印出90=2*3*3*5。
        System.out.println("请输入一个正整数");
        Scanner in=new Scanner(System.in);
        int num = in.nextInt();
        while (num <= 0) {
            System.out.println("请重新输入");
            num = in.nextInt();
        }
        for (int i = 2; i <= num; i++) {
            while (num != i) {
                if (num % i == 0) {
                    System.out.println(i);
                    num = num / i;
                } else {
                    break;
                }
            }
            if (num == i) {
                System.out.println(i);
            }
        }
    }
}
